<%@ page import="com.zx.mobile.domain.MobileUserDomain" %>
<%@ page import="com.zx.mobile.SessionHelper" %>
<!doctype html>
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/mobile/include/include.jsp" %>
<html lang="cn">
<head>
    <%@ include file="/jsp/mobile/include/header.jsp" %>
    <title>结算银行卡</title>
</head>
<body class="nobg">
<%-- <div class="head">
	<div class="auto">
    	<span class="tit">结算银行卡</span>
        <a href="<%=request.getContextPath()%>/mobile/index/mywallet" class="ico retu"></a>
        <a href="###" class="ico add"></a>
    </div>
</div> --%>
<div class="main">
    <div class="bankd">
        <ul>
            <li>
                <%
                    MobileUserDomain user = (MobileUserDomain) request.getSession().getAttribute(SessionHelper.MOBILEUSER);
                    String bankAccount = user.getMerchantInfoDetailModel().getSettleCardInfoModel().getBankAccount();
                    String bankUsrname = user.getMerchantInfoDetailModel().getSettleCardInfoModel().getBankUsrname();
                    StringBuffer tempName = new StringBuffer("");
                    StringBuffer tempAccount = new StringBuffer("");
                    for (int i = 0; i < bankUsrname.length(); i++) {
                        if (i >= 1) {
                            tempName.append("*");
                        } else {
                            tempName.append(bankUsrname.charAt(i));
                        }
                    }
                    for (int j = 0; j < bankAccount.length(); j++) {
                        if (j >= 4 && j < bankAccount.length() - 4) {
                            tempAccount.append("*");
                        } else {
                            tempAccount.append(bankAccount.charAt(j));
                        }
                    }
                    request.setAttribute("tempAccount", tempAccount.toString());
                    request.setAttribute("tempName", tempName.toString());
                    request.setAttribute("lastAccount", bankAccount.substring(bankAccount.length() - 4));
                %>
                <p class="img"><img
                        src="<%=request.getContextPath()%>/images/mobile/${_MOBILEUSER_.merchantInfoDetailModel.settleCardInfoModel.depositBank}.png">
                </p>

                <div class="bankNm" id="toggleid">
                    <p class="tit"><common:getDicByCode key="2100"
                                                        value="${_MOBILEUSER_.merchantInfoDetailModel.settleCardInfoModel.depositBank}"/></p>

                    <p class="con">
                        <span>尾号<c:out value="${lastAccount}"/></span>
                        <span>储蓄卡</span>
                    </p>
                    <i class="ico ico15"></i>
                </div>
                <div class="bankMg" id="bankMg" style="display:block">
                    <p>开户支行：<c:out value="${_MOBILEUSER_.merchantInfoDetailModel.settleCardInfoModel.depositBankbranch}"/></p>

                    <p>开户名：<c:out value="${tempName}"/></p>

                    <p>账户：<c:out value="${tempAccount}"/></p>
                </div>
            </li>
        </ul>
    </div>
</div>
<script type="text/javascript">
    $("#toggleid").bind("click", function() {
        $("#bankMg").toggle();
        var _i = $(this).find("i");
        if (_i.hasClass('ico15')) {
            _i.removeClass("ico15").addClass("ico16");
        } else {
            _i.removeClass("ico16").addClass("ico15");
        }
    });
</script>
</body>
</html>